/*
 * @Descripttion: 考试计划接口
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2021-05-18 10:34:49
 * @LastEditTime: 2021-05-20 21:34:59
 * @FilePath: \cscec-pms-admin\src\api\partyMasses\partyManage\examinationPlan\index.js
 */
import request from '@/utils/request2';
import { unionApiUrl } from '@/api/config.js';

/**
 * @description: 获取考试计划列表
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const getPageExamPlan = data => {
    return request({
        url: `${unionApiUrl}/examPlan/getPageExamPlan`,
        method: 'post',
        data
    })
}
/**
 * @description: 新增编辑考试计划
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const insertOrUpdateSelective = data => {
    return request({
        url: `${unionApiUrl}/examPlan/insertOrUpdateSelective`,
        method: 'post',
        data
    })
}
/**
 * @description: 获取考卷列表
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const queryExamPaperList = data => {
    return request({
        url: `${unionApiUrl}/examPaper/queryExamPaperList`,
        method: 'post',
        data
    })
}
/**
 * @description: 获取参考人员
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const queryPlanMemberList = data => {
    return request({
        url: `${unionApiUrl}/examPlan/queryPlanMemberList`,
        method: 'post',
        data
    })
}
/**
 * @description: 发送
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const sendExamPlan = data => {
    return request({
        url: `${unionApiUrl}/examPlan/sendExamPlan`,
        method: 'post',
        data
    })
}
/**
 * @description: 查询考试计划
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const getExamPlanById = data => {
    return request({
        url: `${unionApiUrl}/examPlan/getExamPlanById`,
        method: 'post',
        data
    })
}
/**
 * @description: 删除考试计划
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const deleteByPrimaryKey = data => {
    return request({
        url: `${unionApiUrl}/examPlan/deleteByPrimaryKey`,
        method: 'post',
        data
    })
}
/**
 * @description: 获取考卷数据
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const getExamUserPaperDetail = data => {
    return request({
        url: `${unionApiUrl}/examPlan/getExamUserPaperDetail`,
        method: 'get',
        params: data
    })
}
/**
 * @description: 待办处理判断
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const getSimpleExamPlanById = data => {
    return request({
        url: `${unionApiUrl}/examPlan/getSimpleExamPlanById`,
        method: 'post',
        data
    })
}
/**
 * @description: 保存草稿
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const saveUserPaperDraft = data => {
    return request({
        url: `${unionApiUrl}/examPlan/saveUserPaperDraft`,
        method: 'post',
        data
    })
}
/**
 * @description: 提交考卷
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const submitUserPaper = data => {
    return request({
        url: `${unionApiUrl}/examPlan/submitUserPaper`,
        method: 'post',
        data
    })
}
/**
 * @description: 开始开始
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const startPlan = data => {
    return request({
        url: `${unionApiUrl}/examPlan/startPlan`,
        method: 'post',
        data
    })
}
export {
    getPageExamPlan,
    insertOrUpdateSelective,
    queryExamPaperList,
    queryPlanMemberList,
    sendExamPlan,
    getExamPlanById,
    deleteByPrimaryKey,
    getExamUserPaperDetail,
    getSimpleExamPlanById,
    saveUserPaperDraft,
    submitUserPaper,
    startPlan
}